<?php
$caroptions = CarOptionDao::findAll();
$objCarOptionForm = new BM_PHPForm();
if (isset($_REQUEST['msg'])) {
	$id = $_REQUEST['id'];
	if ($_REQUEST['msg'] == "infSaved") {
		$objCarOptionForm->SetInfor("save", "Car Option saved successfully !");
	}
	if ($_REQUEST['msg'] == "infDeleted") {
		$objCarOptionForm->SetInfor("delete", "Car Option by id = [$id] deleted successfully .");
	}
}

print $objCarOptionForm->InfMsgs();
print $objCarOptionForm->ErrMsgs();
?>
<div >
<span> 
	<a href="../<?php echo $www;?>/index_admin.php?entity=caroption&action=new">New Car Option</a> 
</span>
</div>

<table class="table">
<tr>
	<th>NAME</th>
	<th>&nbsp;</th>
</tr>
<?php 
foreach ($caroptions as $row) {
print "<tr>";
print "<td>{$row['1']}</td>";
print "<td><a href=\"javascript:deleteObjectByAdmin('{$row[0]}','caroption')\">Delete</a></td>";
print "</tr>";
}
?>

</table>